package com.example.common;

/**
 * Author: Zeran
 * Date: 2024-06-07 22:01
 * Desc: 在这里配置响应体的内容
 */
public class StatusCodes {
	public static final String SUCCESS = "200";
	public static final String SUCCESS_MSG = "成功";
	public static final String BAD_REQUEST = "400";
	public static final String BAD_REQUEST_MSG = "错误请求";
	public static final String UNAUTHORIZED = "401";
	public static final String UNAUTHORIZED_MSG = "授权失败（用户未登录）";   // 登录出错
	public static final String FORBIDDEN = "403";
	public static final String FORBIDDEN_MSG = "拒绝(无权)访问";
	public static final String NOT_FOUND = "404";
	public static final String NOT_FOUND_MSG = "请求路径不存在11";
	public static final String SYSTEM_ERROR = "500";
	public static final String SYSTEM_ERROR_MSG = "系统错误";
	public static final String SERVICE_UNAVAILABLE = "503";
	public static final String SERVICE_UNAVAILABLE_MSG = "服务器暂时无法处理请求";
	public static final String UNKNOWN_ERROR ="999";
	public static final String UNKNOWN_ERROR_MSG = "未知错误";


	/**
	 * 自定义错误 ->1
	 */
	public static final String VALUE_ERROR = "1001";
	public static final String VALUE_ERROR_MSG = "参数不合法";
	// token
	public static final String TOKEN_ERROR = "1002";
	public static final String TOKEN_ERROR_MSG = "非法token";
	public static final String TOKEN_INVALID = "1003";
	public static final String TOKEN_INVALID_MSG = "token无效";

	/**
	 * 用户错误 ->2
	 */
	public static final String USER_NOT_EXIST = "2001";
	public static final String USER_NOT_EXIST_MSG = "用户不存在";
	public static final String USER_ALREADY_EXIST = "2002";
	public static final String USER_ALREADY_EXIST_MSG = "用户名已被使用";
	public static final String USER_AND_PASSWORD_NOT_MATCH = "2003";
	public static final String USER_AND_PASSWORD_NOT_MATCH_MSG = "用户名或密码错误";
	public static final String USER_STATUS_BANED = "2004";
	public static final String USER_STATUS_BANED_MSG = "账号已被封禁，请联系管理员";
	public static final String USER_RELOGIN = "2005";
	public static final String USER_RELOGIN_MSG = "请重新登录";
	public static final String USER_NOT_LOGIN = "2006";
	public static final String USER_NOT_LOGIN_MSG = "用户未登录";
	public static final String FORMAT_ERROR = "2007";
	public static final String FORMAT_ERROR_MSG = "格式不匹配";

	/**
	 * 系统错误 -> 5
	 */
	public static final String SYSTEM_DATABASE_REDIS_EXCEPTION = "5001";
	public static final String SYSTEM_DATABASE_REDIS_EXCEPTION_MSG = "Redis异常";
	public static final String SYSTEM_DATABASE_MYSQL_EXCEPTION = "5002";
	public static final String SYSTEM_DATABASE_MYSQL_EXCEPTION_MSG = "MYSQL异常";
}
